package com.bjh.controller;

import com.bjh.annotation.MyResource;
import com.bjh.service.PeopleService;
import com.bjh.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/zk")
public class ZkController {

    @Resource
    @MyResource
    private UserService userService;

    @Resource
    @MyResource
    private PeopleService peopleService;


    @GetMapping("/test")
    public String test() {
        return userService.test("bjh-",1);
    }


    @GetMapping("/people")
    public Object people() {
        return peopleService.query(1L);
    }

    @GetMapping("/list")
    public Object list() {
        return peopleService.list();
    }

}
